#include <54func.h>
//第三种死锁，线程已经上锁，但接下来还对同一把锁进行加锁
int main()
{
    pthread_mutex_t mutex;
    pthread_mutex_init(&mutex,NULL);//对锁进行初始化
    int ret = pthread_mutex_trylock(&mutex);
    THREAD_ERROR_CHECK(ret,"First!");
    printf("First lock\n");
    ret = pthread_mutex_trylock(&mutex);
    THREAD_ERROR_CHECK(ret,"First!");
    printf("Seconde lock\n");

    return 0;
}
